package com.example.shouYeController.siYunShiPinTongJi;

import com.example.shouYePoji.siYunShiPinTongJi.BetweenTwoTimes;
import com.example.shouYePoji.siYunShiPinTongJi.CourseReturnValue;
import com.example.shouYePoji.siYunShiPinTongJi.CourseStatistics_compareSmallModules;
import com.example.shouYeService.siYunShiPinTongJi.shiXianLei.CourseStatisticsServce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2022-11-12 16:7
 * @function 首页中课程新增数据的所有接口
 * @author  魏承
 */

@RestController
public class CourseStatisticsController {
    @Autowired
    private CourseStatisticsServce gk;
    //近一周的新增课程的记录
    //连接后端接口
    @RequestMapping("CourseStatisticsJiYiZhou")
    public CourseReturnValue glks(){
        return gk.CourseStatisticsJiYiZhou();
    }
//    两个时间之间的新增课程的记录
//连接后端接口
    @RequestMapping("CourseStatisticsLiangGeShiJianZhiJian")
    public CourseReturnValue kjasd(BetweenTwoTimes CanShu){
        CourseReturnValue courseReturnValue = gk.CourseStatisticsLiangGeShiJianZhiJian(CanShu);
//        System.out.println(courseReturnValue);
        return courseReturnValue;
    }
    //上周新增总量
    // 以及同比率
    //连接后端接口
    @RequestMapping("ShangZhouXinZengZongLiang")
    public CourseStatistics_compareSmallModules asd(){
        return gk.YearOnYear();
    }
    //上周申请通过率
    //以及同比上上周通过率的同比率
    //连接后端接口
    @RequestMapping("PassingRate")
    public CourseStatistics_compareSmallModules lksda(){
        return gk.YearOnYear02();
    }
}
